package aps

import glory.xxd.ConsumerUtil
import org.apache.commons.logging.LogFactory

/**
 * 监听
 */
class TopicMsgThreadService  implements Runnable {

    private final static logger = LogFactory.getLog(this)
    public static Map newMsgMap = new HashMap<String,LinkedList>()
    public static Map alertMap = new HashMap<String,List>()
    def msgName = "jms.topic.APS.EAP2PDA"
    public static int max = 30

     public void  run(){
         try{
             println "topic主动监听程序已启动!(${msgName}) "
             ConsumerUtil.getTopicMsg(msgName,max,newMsgMap)
             println "监听执行中........."
         }catch (Exception e){
             println "监听线程中断..........."
             //doBusiness();
            e.printStackTrace()
         }
    }
}
